package org.megha.blog.example.concurrency;

/**
 * A counter. This implementation is thread-safe in
 * that it allows multiple threads to call increment
 * at the same time.
 * 
 * @author megha birmiwal
 */
public class Counter {

	int count = 0;

	synchronized public void increment() {
		count++;			
	}

	public int getCount() {
		return count;
	}
}

